package com.zbkj.admin.mapper1;

import com.mybatisflex.core.BaseMapper;
import com.zbkj.admin.pojo.EbUserVoucherRecordEntity;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.ResultType;
import org.apache.ibatis.annotations.Select;

import java.math.BigDecimal;

public interface EbUserVoucherRecordMapper extends BaseMapper<EbUserVoucherRecordEntity> {


    /**
     * 查询用户最新余额
     * @param uid 用户uid
     * @return 最新余额
     */
//    @ResultType(java.math.BigDecimal.class)
//    @Select("SELECT balance  FROM eb_user_voucher_record WHERE uid = #{uid} ORDER BY create_time DESC LIMIT 1 FOR UPDATE")
//    BigDecimal selectLatestBalance(@Param("uid") Integer uid);

}
